package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the PROFESSIONAL_TITLE database table.
 * 
 */
@Entity
@Table(name="PROFESSIONAL_TITLE")
@NamedQuery(name="ProfessionalTitle.findAll", query="SELECT p FROM ProfessionalTitle p")
public class ProfessionalTitle implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="PROFESSIONAL_TITLE_ZCID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PROFESSIONAL_TITLE_ZCID_GENERATOR")
	@Column(name="ZC_ID")
	private long zcId;

	@Column(name="ZC_NAME")
	private String zcName;

	@Column(name="ZC_PERSON")
	private String zcPerson;

	@Column(name="ZC_SALARY")
	private BigDecimal zcSalary;

	//bi-directional many-to-one association to StaffInformation
	@OneToMany(mappedBy="professionalTitle")
	@JSONField(serialize=false)
	private List<StaffInformation> staffInformations;

	public ProfessionalTitle() {
	}

	public long getZcId() {
		return this.zcId;
	}

	public void setZcId(long zcId) {
		this.zcId = zcId;
	}

	public String getZcName() {
		return this.zcName;
	}

	public void setZcName(String zcName) {
		this.zcName = zcName;
	}

	public String getZcPerson() {
		return this.zcPerson;
	}

	public void setZcPerson(String zcPerson) {
		this.zcPerson = zcPerson;
	}

	public BigDecimal getZcSalary() {
		return this.zcSalary;
	}

	public void setZcSalary(BigDecimal zcSalary) {
		this.zcSalary = zcSalary;
	}

	public List<StaffInformation> getStaffInformations() {
		return this.staffInformations;
	}

	public void setStaffInformations(List<StaffInformation> staffInformations) {
		this.staffInformations = staffInformations;
	}

	public StaffInformation addStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().add(staffInformation);
		staffInformation.setProfessionalTitle(this);

		return staffInformation;
	}

	public StaffInformation removeStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().remove(staffInformation);
		staffInformation.setProfessionalTitle(null);

		return staffInformation;
	}

}